package io;

import java.io.*;

public class OOSDemo {
    public static void main(String[] args) throws IOException {
        String name = "苍老师";
        int age = 39;
        String gender = "女";
        String[] otherInfo = {"技术好", "拍片儿好", "大家的性启蒙老师"};
        Person p = new Person(name, age, gender, otherInfo);

        FileOutputStream fos = new FileOutputStream("person.obj");
        ObjectOutputStream oos = new ObjectOutputStream(fos);
        /**
         * ObjectOutputStream上提供了
         */
        oos.writeObject(p);
        System.out.println("对象输出完毕");
    }
}
